﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<%@ Import Namespace="Chowpoo.Util" %>
<%@ Import Namespace="CourseSystem.Core.BLL" %>
<%
    string temp = Model == null ? "" : Model.ToString();
    int model = temp.CheckInt(-1); //((Model == null) ? -1 : Model.ToString().CheckInt(-1));

    var list = CourseGuideMenuBLL.GetAll();
    if (temp == "" && list.Count > 0 )
        model = list[0].Id;
%>
<tr>
    <td height="25" bgcolor="#98c1e1">
        <table width="1000" height="25" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="100">
                </td>
                <td width="10" valign="middle" class="style1">
                    <img src="<%=ResolveUrl("~/Content/images/"+((-1==model)?"0":"")+"2_14.gif") %>"
                        width="7" height="7" align="absmiddle">
                </td>
                <td width="70" valign="middle" class="style11">
                    <%--<span class="style26">课程通知</span>--%>
                    <a class="<%=((-1==model)?"style26":"guide") %>" href="<%=Url.Action("News") %>">课程通知</a>
                </td>
                <%  foreach (var item in list)
                    { %>
                <td width="10" valign="middle" class="style1">
                    <img src="<%=ResolveUrl("~/Content/images/"+((item.Id==model)?"0":"")+"2_14.gif") %>"
                        width="7" height="7">
                </td>
                <td width="71" valign="middle" class="style11">
                    <a class="<%=((item.Id==model)?"style26":"guide") %>" href="<%=Url.Action("Index",new{id=item.Id}) %>">
                        <%=item.Name %></a>
                </td>
                <%} %>
                <td width="418">
                </td>
            </tr>
        </table>
    </td>
</tr>
